def findContentChildren(g, s):
    g.sort()
    s.sort()
    
    child_i = 0
    cookie_j = 0
    satisfied_children = 0
    
    while child_i < len(g) and cookie_j < len(s):
        if s[cookie_j] >= g[child_i]:
            satisfied_children += 1
            child_i += 1  
        cookie_j += 1 
    
    return satisfied_children

if __name__ == "__main__":
    # 示例数据
    g = [1, 2, 3]
    s = [1, 1]

    result = findContentChildren(g, s)
    print("最大满足的孩子数量:", result)